<?php

/**
 * 站点模块配置信息
 * This application invoked all can used modules
 * @filename modules.php
 * @copyright (c) 2016 http://www.oceansworld.cn All rights reserved.
 * @licensed http://www.oceansworld.cn/licenses/docs
 * @author emhome <emhome@163.com>
 */
$modules = [
    'user' => [
        'class' => 'frontend\modules\user\Module',
    ],
    'app' => [
        'class' => 'frontend\modules\app\Module',
    ],
    'discover' => [
        'class' => 'frontend\modules\discover\Module',
    ],
    'cms' => [
        'class' => 'frontend\modules\cms\Module',
    ],
    'shop' => [
        'class' => 'frontend\modules\shop\Module',
    ],
    'trade' => [
        'class' => 'frontend\modules\trade\Module',
    ],
    'member' => [
        'class' => 'frontend\modules\member\Module',
    ],
    'commission' => [
        'class' => 'frontend\modules\commission\Module',
    ],
    'activity' => [
        'class' => 'frontend\modules\activity\Module',
    ],
    'share' => [
        'class' => 'frontend\modules\share\Module',
    ],
    'spread' => [
        'class' => 'frontend\modules\spread\Module',
    ],
];

if (YII_DEBUG) {
    $modules['debug'] = [
        'class' => 'frontend\modules\debug\Module',
    ];
}

if (file_exists(__DIR__ . '/modules-local.php')) {
    $modules = call_user_func_array(['yii\helpers\ArrayHelper', 'merge'], [
        $modules,
        require(__DIR__ . '/modules-local.php'),
    ]);
}

return $modules;
